#include <bits/stdc++.h>
using namespace std;
const int N = 4;
int yi[N] = {2, 4, 6, 8};
int jia[N] = {1, 3, 5, 7};
int visit[N];
int sum = 0;
void dfs(int depth, int s) {
  if (depth >= N) {
    if(s>=2) sum++;
    return;
  }
  for (int i = 0; i < N; i++) {
    if ( visit[i]==0) {
      int socre = jia[i] > yi[depth] ? 1 : 0;
      if (s + socre + N - depth >= 2) {
        visit[i] = 1;
        dfs(depth + 1, s + socre);
        visit[i] = 0;
      }
    }
  }
}

int main() {

  long long zong = 1;
  for (int i = 1; i <= N; i++) {
    zong *= i;
  }

  dfs(0, 0);
  cout << fixed << setprecision(2) << sum * 1.0 / zong;
  return 0;
}